<?php $this->render('cmswidgets.views.notification'); ?>
<?php

$form = $this->beginWidget('CActiveForm', array(
    'id' => 'userupdatesettings-form',
    'enableAjaxValidation' => true,
    'htmlOptions' => array(
        'name' => 'updateForm',
    ),
        ));
?>

<?php

$this->widget('zii.widgets.grid.CGridView', array(
    'id' => 'user-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'summaryText' => t('cms', 'Displaying') . ' {start} - {end} ' . t('cms', 'in') . ' {count} ' . t('cms', 'results'),
    'pager' => array(
        'header' => t('cms', 'Go to page:'),
        'nextPageLabel' => t('cms', 'Next'),
        'prevPageLabel' => t('cms', 'previous'),
        'firstPageLabel' => t('cms', 'First'),
        'lastPageLabel' => t('cms', 'Last'),
        'pageSize' => Yii::app()->settings->get('system', 'page_size')
    ),
    'columns' => array(
        array('name' => 'id',
            'type' => 'raw',
            'htmlOptions' => array('class' => 'gridmaxwidth'),
            'value' => '$data->id',
        ),
        array('name' => 'codeTo',
            'type' => 'raw',
            'htmlOptions' => array('class' => 'gridmaxwidth'),
            'value' => '$data->codeTo',
        ),
        array(
            'header' => t('cms', 'Rating Conversion ( 1USD )'),
            'type' => 'raw',
            'value' => '$data->conversionRate',
        ),
        array(
            'header' => t('cms', 'Update time'),
            'type' => 'raw',
            'value' => 'date("M/d/y, H:i:s", $data->updatedTime)',
        ),
        array
            (
            'class' => 'CButtonColumn',
            'template' => '{delete}',
            'buttons' => array
                (
                'delete' => array
                    (
                    'label' => t('cms', 'Delete'),
                    'imageUrl' => false,
                ),
            ),
        ),
    ),
));
?>
<?php

echo CHtml::submitButton(t('cms', 'Update all Currency'), array('class' => 'bebutton active', 'name' => 'updateAll'));
?>
<?php $this->endWidget(); ?>


